Skip to content

Replace \dontrun with \donttest per CRAN feedback#74

Merged
osorensen merged 2 commits intomainfrom
copilot/fix-cran-submission-feedback
Jan 30, 2026
Merged

Replace \dontrun with \donttest per CRAN feedback#74
osorensen merged 2 commits intomainfrom
copilot/fix-cran-submission-feedback

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 30, 2026

CRAN manual review rejected the package for using \dontrun{} on executable examples. Per CRAN policy, \dontrun{} is reserved for examples that cannot execute (missing dependencies, API keys); \donttest{} is for executable examples that may exceed 5 seconds runtime.

Changes

  • R/plot.R: Replace \dontrun{} with \donttest{} in plot.BayesMallowsSMC2() examples
  • R/trace_plot.R: Replace \dontrun{} with \donttest{} in trace_plot() examples
  • man/*.Rd: Update corresponding generated documentation files

All examples use included package data (complete_rankings) and are fully executable but involve SMC algorithm computation that may take several seconds.

# Examples now wrapped in \donttest{} instead of \dontrun{}
\donttest{
  mod <- compute_sequentially(
    complete_rankings,
    hyperparameters = set_hyperparameters(n_items = 5),
    smc_options = set_smc_options(n_particles = 100, n_particle_filters = 1)
  )
  plot(mod)
}
Original prompt

This section details on the original issue you should resolve

<issue_title>CRAN submission feedback</issue_title>
<issue_description>The package now passes the automated CRAN checks, but we got this message back based on the manual inspection:

Thanks,

\dontrun{} should only be used if the example really cannot be executed (e.g. because of missing additional software, missing API keys, ...) by the user. That's why wrapping examples in \dontrun{} adds the comment ("# Not run:") as a warning for the user. Does not seem necessary. Please replace \dontrun with \donttest.
Please unwrap the examples if they are executable in < 5 sec, or replace dontrun{} with \donttest{}.
For more details: https://contributor.r-project.org/cran-cookbook/general_issues.html#structuring-of-examples

Please fix and resubmit.

Best,
Benjamin Altmann</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CRAN submission feedback for examples Replace \dontrun with \donttest per CRAN feedback Jan 30, 2026
Copilot AI requested a review from osorensen January 30, 2026 08:00
@osorensen osorensen marked this pull request as ready for review January 30, 2026 09:16
@osorensen osorensen merged commit 136da7d into main Jan 30, 2026
5 checks passed
@osorensen osorensen deleted the copilot/fix-cran-submission-feedback branch January 30, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CRAN submission feedback

2 participants